/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.sistemas.sse.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.Proxy;

/**
 *
 * @author laptop-w8
 */
@Entity
@Table(name = "MPRMING")
@Proxy(lazy = false)
public class PromocionIngreso implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "CPRMING")
    private long id_promocionIngreso;
    @Column(name = "DBASE_PRMING")
    private String dbase;
    @Column(name = "FING_PRMING")
    private Date fingreso;
    @Column(name = "FEGREPRMING")
    private Date fegreso;
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER,mappedBy = "promocionIngreso")
    private Set<Egresado> egresados;
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "CPLANEST", referencedColumnName = "CPLANEST", nullable = false)
    private PlanEstudio planEstudio;
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "CEAP", referencedColumnName = "CEAP", nullable = false)
    private Eap eap;

    public long getId_promocionIngreso() {
        return id_promocionIngreso;
    }

    public void setId_promocionIngreso(long id_promocionIngreso) {
        this.id_promocionIngreso = id_promocionIngreso;
    }

    public String getDbase() {
        return dbase;
    }

    public void setDbase(String dbase) {
        this.dbase = dbase;
    }

    public Date getFingreso() {
        return fingreso;
    }

    public void setFingreso(Date fingreso) {
        this.fingreso = fingreso;
    }

    public Date getFegreso() {
        return fegreso;
    }

    public void setFegreso(Date fegreso) {
        this.fegreso = fegreso;
    }

    public Set<Egresado> getEgresados() {
        return egresados;
    }

    public void setEgresados(Set<Egresado> egresados) {
        this.egresados = egresados;
    }

    public PlanEstudio getPlanEstudio() {
        return planEstudio;
    }

    public void setPlanEstudio(PlanEstudio planEstudio) {
        this.planEstudio = planEstudio;
    }

    public Eap getEap() {
        return eap;
    }

    public void setEap(Eap eap) {
        this.eap = eap;
    }
    
}
